using System.Net.Security;
using System.ServiceModel;

namespace DemoLib.Shared.Contracts
{
    //[MessageContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
    [MessageContract(ProtectionLevel = ProtectionLevel.None)]
    public class AuthContract<T>
        //where T: class 
    {
        //[MessageHeader(ProtectionLevel = ProtectionLevel.EncryptAndSign, MustUnderstand = true)]
        [MessageHeader]
        public string Key { get; set; }
        [MessageBodyMember]
        public T Data { get; set; }
    }

    [MessageContract]
    public class LogOnContract
    {
        //[MessageBodyMember(ProtectionLevel = ProtectionLevel.Sign)]
        [MessageBodyMember]
        public string UserId { get; set; }

        //[MessageBodyMember(ProtectionLevel = ProtectionLevel.EncryptAndSign)]
        [MessageBodyMember]
        public string Password { get; set; }
    }
}